import { lazy} from 'react'
import {Navigate } from 'react-router-dom'
import Home from "../views/welcome/components/home/home";
const Login =lazy(()=>import("../views/login/login"))
const Welcome=lazy(()=>import("../views/welcome/welcome"))
const Register=lazy(()=>import("../views/register/register"))
const AuthRoute=lazy(()=>import("../router/utils/authRoute"))
const routers:any[]=[
    {
        path:"/login",
        element:<Login/>,
    },
    {
        path:"/register",
        element:<Register/>,
    },
    {
        path:"/welcome",
        element:<Welcome/>,
        children:[
            {
                element:<Home/>,
                index:true
            }
        ]
    },

    {
        path:"*",
      element: <div>404</div>
    },


    {
        path:"/",
        element:<Navigate to={"/login"} replace />
    }

]




export default routers